package com.ruoyi.order.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ruoyi.order.domain.GoodsOrderGoodsInfo;
import com.ruoyi.order.mapper.GoodsOrderGoodsInfoMapper;
import com.ruoyi.order.service.IGoodsOrderGoodsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 卖品订单卖品信息Service业务层处理
 *
 * @author HHAOYU
 * @date 2021-01-16
 */
@Service
public class GoodsOrderGoodsInfoServiceImpl extends ServiceImpl<GoodsOrderGoodsInfoMapper, GoodsOrderGoodsInfo> implements IGoodsOrderGoodsInfoService {
    @Autowired
    private GoodsOrderGoodsInfoMapper goodsOrderGoodsInfoMapper;

    /**
     * 查询卖品订单卖品信息
     *
     * @param id 卖品订单卖品信息ID
     * @return 卖品订单卖品信息
     */
    @Override
    public GoodsOrderGoodsInfo selectGoodsOrderGoodsInfoById(Long id)
    {
        return goodsOrderGoodsInfoMapper.selectGoodsOrderGoodsInfoById(id);
    }

    /**
     * 查询卖品订单卖品信息列表
     *
     * @param goodsOrderGoodsInfo 卖品订单卖品信息
     * @return 卖品订单卖品信息
     */
    @Override
    public List<GoodsOrderGoodsInfo> selectGoodsOrderGoodsInfoList(GoodsOrderGoodsInfo goodsOrderGoodsInfo)
    {
        return goodsOrderGoodsInfoMapper.selectGoodsOrderGoodsInfoList(goodsOrderGoodsInfo);
    }

    /**
     * 新增卖品订单卖品信息
     *
     * @param goodsOrderGoodsInfo 卖品订单卖品信息
     * @return 结果
     */
    @Override
    public int insertGoodsOrderGoodsInfo(GoodsOrderGoodsInfo goodsOrderGoodsInfo)
    {
        return goodsOrderGoodsInfoMapper.insertGoodsOrderGoodsInfo(goodsOrderGoodsInfo);
    }

    /**
     * 修改卖品订单卖品信息
     *
     * @param goodsOrderGoodsInfo 卖品订单卖品信息
     * @return 结果
     */
    @Override
    public int updateGoodsOrderGoodsInfo(GoodsOrderGoodsInfo goodsOrderGoodsInfo)
    {
        return goodsOrderGoodsInfoMapper.updateGoodsOrderGoodsInfo(goodsOrderGoodsInfo);
    }

    /**
     * 批量删除卖品订单卖品信息
     *
     * @param ids 需要删除的卖品订单卖品信息ID
     * @return 结果
     */
    @Override
    public int deleteGoodsOrderGoodsInfoByIds(Long[] ids)
    {
        return goodsOrderGoodsInfoMapper.deleteGoodsOrderGoodsInfoByIds(ids);
    }

    /**
     * 删除卖品订单卖品信息信息
     *
     * @param id 卖品订单卖品信息ID
     * @return 结果
     */
    @Override
    public int deleteGoodsOrderGoodsInfoById(Long id)
    {
        return goodsOrderGoodsInfoMapper.deleteGoodsOrderGoodsInfoById(id);
    }
}
